#define _CRT_SECURE_NO_WARNINGS
#include "Sort.h"
#include"Stackhead.h"

void PrintArray(int* a, int n)
{
	for (int i = 0; i < n; ++i)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}

void Text()
{
	int a[] = { 11,99,33,44,55,66,77,88,100 };
	int b[] = { 34, 56, 25, 65, 86, 99, 72, 66 };
	int c[] = { 5,2,3,1 };
	int d[] = { 100, 56, 25, 65, 86, 99, 72, 66 };


	
	InsertSort(a, sizeof(a) / sizeof(int));
	PrintArray(a, sizeof(a) / sizeof(int));


	ShellSort(b, sizeof(b) / sizeof(int));
	PrintArray(b, sizeof(b) / sizeof(int));


	 BubbleSort(c, sizeof(c) / sizeof(int));
	 PrintArray(c, sizeof(c) / sizeof(int));

	 /*HeapSort(d,sizeof(d) / sizeof(int));
	 PrintArray(d, sizeof(d) / sizeof(int));*/


	 //ChooseSort(d, sizeof(d) / sizeof(int));
	 //PrintArray(d, sizeof(d) / sizeof(int));

	 QuickSortNonR(d, 0,sizeof(d) / sizeof(int)-1);
	 PrintArray(d, sizeof(d) / sizeof(int));
}

int main()
{
	Text();
	return 0;
}